#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_log.h"
#include "esp_bt.h"

#include "esp_gap_ble_api.h"
#include "esp_gatts_api.h"
#include "esp_bt_defs.h"
#include "esp_bt_main.h"
#include "esp_gatt_common_api.h"
#include "nvs_flash.h"
#include "nvs_config.h"
#include "ble_service.h"

#define TAG "BT_SERVICE"

void sys_bt_task(void* param)
{
    ESP_LOGI(TAG, "sys_bt_task start");

    uint16_t count1 = 1;
    uint16_t count2 = 100;

    ble_cfg_net_init();

    while(1)
    {
        vTaskDelay(pdMS_TO_TICKS(3000));
        ble_set_ch1_value(count1++);
        vTaskDelay(pdMS_TO_TICKS(7000));
        ble_set_ch2_value(count2++);
    }
}
